import java.util.Scanner;

public class Ex5_7{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("The amount invested: ");
		double amount = input.nextDouble();
		System.out.print("Annual interest rate: ");
		double rate = input.nextDouble();
		System.out.print("Years\t\tFuture Value\n");
		for (int year = 1; year <= 30; year++)
			System.out.printf("%d\t\t%.2f\n", year, 
			futureInvestmentValue(amount, rate/1200, year));
	}

	public static double futureInvestmentValue(
		double investmentAmount, double monthlyInterestRate, int years){
		return investmentAmount * Math.pow(1 + monthlyInterestRate, years*12);
	}
}
